package module1.tests;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import module1.main.LongDivision;

import org.junit.Assert;
import org.junit.Test;

public class LongDivisionTest {

    @Test
    public void inputTest() {
	Integer expectedDividend = 555;
	Integer expectedDivisor = 5;
	//if we write dividend = 555 and divisor = 5
	LongDivision ld = LongDivision.input();
	Integer actualDividend = ld.getDividend();
	Integer actualDivisor = ld.getDivisor();
	
	Assert.assertEquals(expectedDividend, actualDividend);
	Assert.assertEquals(expectedDivisor, actualDivisor);
    }

    @Test
    public void doDivisionTest() {
	//if we write dividend = 555 and divisor = 5
        LongDivision ld = LongDivision.input();
        
        List<Integer> expectedList = new ArrayList<Integer>();
        for(int i=0; i<6; i++){
            expectedList.add(5);
        }
        
        List<Integer> actualList = ld.doDivision();     
        Assert.assertEquals(expectedList, actualList);
    }
}
